import snowflake.client

# 链接服务端并初始化一个pysnowflake客户端
host = '127.0.0.1'
port = 8910
snowflake.client.setup(host, port)


class SnowFlakeGuid():
    # 生成一个全局唯一的ID（在MySQL中可以用BIGINT UNSIGNED对应）
    def get_guid(worker=0):
        return snowflake.client.get_guid()
